<div class="page-header">
    <h1>Intro</h1>
</div>

<div class="row">

    <div class="col col-lg-6">
        <div style="margin-top: 20px">
            <h3>Steps for getting started (example on right)</h3>
            <ol>
                <li>Add references to <a href="http://angularjs.org/" target="_blank">AngularJS</a>. EG:<br/>
<pre style="margin-top:10px" data-prettycode pretty-lang="html">
&lt;script src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.2/angular.js"&gt;&lt;/script&gt;
</pre>
                </li>
                <li>Add references to <a href="https://github.com/esvit/ng-table/">ngTable</a>'s javascript and css files. EG:<br/>
<pre style="margin-top:10px" data-prettycode pretty-lang="html">
&lt;link rel=&quot;stylesheet&quot; href=&quot;https://cdn.rawgit.com/esvit/ng-table/v1.0.0/dist/ng-table.min.css&quot;&gt;
&lt;script src="https://cdn.rawgit.com/esvit/ng-table/v1.0.0/dist/ng-table.js"&gt;&lt;/script&gt;
</pre></li>
                <li>Where you declare your app module, add <code>ngTable</code>:<br>
<pre style="margin-top:10px" data-prettycode pretty-lang="js">
angular.module("myApp", ["ngTable"]);
</pre>
                </li>
                <li>In your html file within the controller where you plan to use <code>ng-table</code>, add:<br>
<pre style="margin-top:10px" data-prettycode pretty-lang="html">
&lt;table ng-table=&quot;vm.tableParams&quot; class=&quot;table&quot; show-filter=&quot;true&quot;&gt;
    &lt;tr ng-repeat=&quot;user in $data&quot;&gt;
        &lt;td title=&quot;'Name'&quot; filter=&quot;{ name: 'text'}&quot; sortable=&quot;'name'&quot;&gt;
            {{user.name}}&lt;/td&gt;
        &lt;td title=&quot;'Age'&quot; filter=&quot;{ age: 'number'}&quot; sortable=&quot;'age'&quot;&gt;
            {{user.age}}&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
</pre>
                </li>
                <li>In your javascript file within the controller where you plan to use <code>ng-table</code>, declare:<br> </li>
<pre style="margin-top:10px" data-prettycode pretty-lang="js">
var self = this;
var data = [{name: "Moroni", age: 50} /*,*/];
self.tableParams = new NgTableParams({}, { dataset: data});
</pre>
            </ol>
        </div>
    </div>
    <div class="col col-lg-6">

        <h3>Example</h3>
        <div>

            <table ng-table="vm.tableParams" class="table" show-filter="true">
                <tr ng-repeat="user in $data">
                    <td title="'Name'" filter="{ name: 'text'}" sortable="'name'">
                        {{user.name}}
                    </td>
                    <td title="'Age'" filter="{ age: 'number'}" sortable="'age'">
                        {{user.age}}
                    </td>
                </tr>
            </table>
        </div>

    </div>

</div>
